package com.ruoyi.stu.enums;

public class StuStudentCourseEnum {
	
	public enum Complete {
		YES("已完成", 1, "completed"),
		NO("未完成", 0, "incomplete");

		public String name;
		public Integer value;
		public String frontValue;

		private Complete(String name, Integer value, String frontValue) {
			this.name = name;
			this.value = value;
			this.frontValue = frontValue;
		}

		public static String getName(Integer value) {
			for (Complete e : Complete.values()) {
				if (e.value == value) {
					return e.name;
				}
			}

			return "";
		}

		public static String getFrontValue(Integer value) {
			for (Complete e : Complete.values()) {
				if (e.value == value) {
					return e.frontValue;
				}
			}

			return "";
		}
	}
}
